package main

import "fmt"

type myType string

func (m myType) sayHi() {
	fmt.Println(m)
}

func (m myType) methodWithParameters(number int, flag bool) {
	fmt.Println(m)
	fmt.Println(number)
	fmt.Println(flag)
}

func (m myType) withReturn() int {
	return len(m)
}

func main() {
	value := myType("I'm your father")
	value.sayHi()
	value.methodWithParameters(4, true)
	println(value.withReturn())
	n := number(4)
	println("Original value of number:", n)
	n.double()
	println("number after calling Double:", n)
}

type number int

func (n *number) double() {
	*n *= 2
}
